#include <stdlib.h>
#include <stdio.h>
#include <omp.h>

int main(void) {
    int n = 19;
    int a[n];
    int t[6];

    for (int i = 0; i < 6 ; i++)
        t[i] = 0;

    # pragma omp parallel for schedule (runtime)
    for (int i = 0; i < n ; i++) {
        a[i] = omp_get_thread_num();
        t[omp_get_thread_num()]++; // t[omp_get_thread_num()] = t[omp_get_thread_num()] + 1;
    }
    
    for (int i = 0; i < n - 1; i++)
        printf("%d & ", a[i]);
    printf("%d ", a[n - 1]);
    printf("\\\\\n");

    for (int i = 0; i < 5; i++)
        printf("%d & ", t[i]);
    printf("%d ", t[5]);
    printf("\\\\\n");

    return 0;
}
